package com.example.lhsama.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.lhsama.domain.Role;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Date: 2021年09月19日 15:03
 * @Author: LHSAMA
 */
@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    @Insert("insert into user_role values (#{uid},#{rid})")
    void saveUidRid(Integer uid,Integer rid);

    @Select("select * from role where role_name = #{roleName}")
    Role findRoleByName(String roleName);
}
